-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print error code #2800
base: master
Are you sure you want to change the base?
Print error code #2800
Conversation
771b668
to
44cf9e1
Compare
cicheck |
Signed-off-by: NopeDl <h2012497638@outlook.com>
44cf9e1
to
91ad4ad
Compare
cicheck |
2 similar comments
cicheck |
cicheck |
add topology support and remove storage status Signed-off-by: NopeDl <h2012497638@outlook.com>
9abc9fc
to
3f71912
Compare
cicheck |
src/mds/common/mds_define.h
Outdated
@@ -47,6 +47,27 @@ const int kCsClientReturnFail = -5; | |||
// error code: chunkserver offline | |||
const int kCsClientCSOffline = -6; | |||
|
|||
const char* PrintMdsDescByErrorCode(int code) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const char* PrintMdsDescByErrorCode(int code) { | |
inline const char* MdsErrCodeToName(int code) { |
src/mds/common/mds_define.h
Outdated
@@ -104,6 +125,59 @@ const int kTopoErrCodePoolsetNotFound = -20; | |||
const int kTopoErrCodeCannotDeleteDefaultPoolset = -21; | |||
const int kTopoErrCodeConflictBlockSizeAndChunkSize = -22; | |||
|
|||
const char* PrintTopoErrCodeDescription(int code) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const char* PrintTopoErrCodeDescription(int code) { | |
inline const char* TopoErrCodeToName(int code) { |
Signed-off-by: NopeDl <h2012497638@outlook.com>
@NopeDl continue? |
@@ -47,6 +47,27 @@ const int kCsClientReturnFail = -5; | |||
// error code: chunkserver offline | |||
const int kCsClientCSOffline = -6; | |||
|
|||
inline char* MdsErrCodeToName(int code) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline char* MdsErrCodeToName(int code) { | |
inline const char* MdsErrCodeToName(int code) { |
cicheck |
What problem does this PR solve?
Issue Number: #2185
What is changed and how it works?
What's Changed: print error code with more meaningful name
How it Works: use the function to convert error code to string
Side effects(Breaking backward compatibility? Performance regression?):
Check List